<!--
 * @FilePath: /fxfzywpt/src/views/vulnerability/components/Legend.vue
 * @Description: 
-->

<template>
  <div class="legend-main" :style="styles">
    <div class="legend-title">图例</div>
    <div class="legend-sub-title">易损性完备度</div>
    <ColorPalette :startColor="startColor" :endColor="endColor"></ColorPalette>
    <div class="num">
      <div>0</div>
      <div>1</div>
    </div>
  </div>
</template>

<script setup>
import ColorPalette from '@/components/ColorPalette';

const props = defineProps({
  startColor: {
    type: String,
    default: '#FFFFFF',
  },
  endColor: {
    type: String,
    default: '#A80000',
  },
  styles: {
    required: false,
    type: Object,
    default: {
      position: 'absolute',
      bottom: '0',
      left: '42px',
    },
  },
});
</script>

<style scoped lang="scss">
.legend-main {
  padding: 15px 14px 20px 11px;
  display: flex;
  flex-direction: column;
  min-width: 120px;
  width: 180px;
  /* height: 90px; */
  background: rgba(48, 96, 255, 0.15);
  border-radius: 0px 0px 0px 0px;
  opacity: 1;
  border: 1px solid #0190f9;
  .legend-title {
    font-weight: bold;
    font-size: 14px;
    font-family: Source Han Sans CN-Regular, Source Han Sans CN;
    color: #ffffff;
    line-height: 23px;
  }
  .legend-sub-title {
    font-size: 12px;
    font-family: Helvetica Neue LT Pro-55 Roman, Helvetica Neue LT Pro;
    font-weight: normal;
    color: #ffffff;
    line-height: 23px;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .num {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 12px;
    font-family: Helvetica Neue LT Pro-55 Roman, Helvetica Neue LT Pro;
    font-weight: normal;
    color: #ffffff;
  }
}
</style>
